package ${packageName}.controller.${module};

import com.cecil.generate.model.PageRequest;
import com.cecil.generate.model.Result;
import ${packageName}.controller.BaseController;
import ${packageName}.domain.${module}.${table.className};
import ${packageName}.service.${module}.${serviceClassName};
import com.baomidou.mybatisplus.core.metadata.IPage;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;

/**
* ${table.tableName}
* <p>${table.tableComment}</p>
* @author ${author!}
**/
@Slf4j
@RestController
@RequestMapping(value = "/${table.mappingUrl}")
public class ${fileName} extends BaseController<${table.className}, ${serviceClassName}> {

    public ${table.className}Controller(${serviceClassName} service) {
        super(service);
    }

    @PostMapping(value = "/page", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
    public Result<IPage<${table.className}>> page(@RequestBody PageRequest<${table.className}, ${table.className}> pageRequest) {
        IPage<${table.className}> page = service.page(pageRequest);
        return Result.success(page);
    }
    
}